package pl.edu.pk.mech.kkbus.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import pl.edu.pk.mech.kkbus.model.Award;
import pl.edu.pk.mech.kkbus.repository.AwardDAO;
import static pl.edu.pk.mech.kkbus.staticstrings.NameEntity.NAME_ENTITY_AWARD;

public class AwardService {

    @Autowired
    AwardDAO awardDAO;
    
    public boolean createOrUpdateAward(Award award) {
    	return awardDAO.createOrUpdate(award, NAME_ENTITY_AWARD, awardDAO);
    }
    
    public List<Award> getAllAwards() {
        return awardDAO.getAllAward();
    }
    
    public Award getAward(long id) {
        return awardDAO.getAward(id);
    } 
}
